<!-- 商品管理 -->
<?php
include 'app-begin.php';
?>
<main class="body-data">
    <div class="panel">
        <div class="panel_cancel">取消</div>
        <form action="../Model/GoodsCheck.php" method="post">
            <div class="all_form">
                <input type="text" name="goods_name" required placeholder="请输入商品名此项为必填项！">
                <input type="text" name="goods_price" placeholder="请输入价格默认为0.01">
                <input type="text" name="goods_total" placeholder="请输入数量默认为0">
                <input type="text" name="goods_status" placeholder="请输入商品状态默认为1">
                <input type="text" name="goods_keywords " placeholder="请输入商品关键字此内容方便用户进行搜索">
                <input type="text" name="goods_description" placeholder="请输入商品描述">
                <input type="text" name="goods_add_time" required placeholder="请添加时间此项为必填项！">
            </div>
            <div class="all_button">
                <button class="panel_reset" type="reset">重置</button>
                <button class="panel_submit" type="submit">提交</button>
            </div>
        </form>
    </div>
    <div id="window_table">

        <div class="add_data_button">添加</div>
        <table border="1">
            <caption>商品管理页面</caption>
            <thead>
                <tr>

                    <td>序号</td>
                    <td>商品名</td>
                    <td>商品价格</td>
                    <td>商品数量</td>
                    <td>商品状态</td>
                    <td>商品关键词</td>
                    <td>商品描述</td>
                    <td>商品添加时间</td>
                    <td colspan="2">操作</td>
                </tr>
            </thead>
            <tbody>
                <?php
                include __DIR__ . '/../Controller/goods.php';
                foreach ($allData as $k => $v) {
                    echo "<tr>";
                    foreach ($v as $value) {
                        echo "<td>";
                        echo $value;
                        echo "</td>";
                    }
                    echo "<td><a href='javascript:modifyGoods({$v["goods_id"]})'>修改</a></td>";
                    echo "<td><a href='javascript:delGoods({$v["goods_id"]})'>删除</a></td>";
                    echo "</tr>";
                }
                ?>
            </tbody>
        </table>
    </div>
</main>
<script src="../assets/js/goods.js"></script>
<?php
include 'app-end.php';

?>